import { memo, FC } from "react";
import { Icomp } from "../../store/commonStoreTypes";
interface IProps {
  info: Icomp,
  index: number,
}
const ImgSider: FC<IProps> = memo((props) => {
  return (
    <div key={props.info.key} style={props.info.style} draggable={true} onDragStart={(e) => {
      e.dataTransfer.setData(
        "lplp",
        JSON.stringify({  ...props.info, index: props.index })
      );
    }}>
      {props.info.value}
    </div>
  );
});

export default ImgSider;
